<?php
class Trip_place
{
	public $trip_place_id=-1;
	public $place_id;
	public $trip_id;
	public $state;
	public $description;
	public $rate;
	
	protected $db;
	
    public function __construct($db)
    {
        $this->db = $db;
        $this->state = 0;
        $this->rate = 0;
        
    }
	
	public function insert()	
    {
    	$data = array("place_id"=>$this->place_id,
                      "trip_id"=> $this->trip_id);
    	
        $result = $this->db->insert("trip_place",$data);        
        return($result);
    }
    
}
